package com.xinzhidi.web.netty.controller;

import com.xinzhidi.common.core.controller.BaseController;
import com.xinzhidi.common.core.page.TableDataInfo;
import com.xinzhidi.web.netty.entity.AgreementCommand;
import com.xinzhidi.web.netty.entity.po.AgreementCommandPo;
import com.xinzhidi.web.netty.service.AgreementCommandService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/***
 * 协议指令表
 * @author cx
 * @date 2023/6/6 9:56
 */
@RestController
@Api(tags = "协议指令表")
@RequestMapping("/agreementCommand")
@RequiredArgsConstructor
public class AgreementCommandController extends BaseController {

    private final AgreementCommandService agreementCommandService;

    @ApiOperation("查询协议列表")
    @PostMapping("/listAgreementCommand")
    public TableDataInfo<AgreementCommand> listAgreementCommand(@Validated @RequestBody AgreementCommandPo po) {
        startPagePost(po);
        return agreementCommandService.listAgreementCommand(po);
    }

}
